<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> 
<title>Jeep内容厨房</title>
<link type="text/css" rel="stylesheet" href="js/zepto.alert.css"/>
<link type="text/css" rel="stylesheet" href="js/selector.css"/>
<script type="text/javascript" src="js/zepto.min.js"></script>
<script type="text/javascript" src="js/zepto.alert.js"></script>
<script src="js/Selector.js"></script>
</head>
<style>
body{margin:0; padding:0; color:#000000; font-size:18px;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;}
.tblForm{width:270px;height:110px; text-align:center; font-size:14px; color:#747474;}
.tblForm td{line-height:30px; margin:auto; text-align:left; vertical-align:middle;}
input {color:#000000;width:140px;height:25px;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 18px; BACKGROUND: none transparent scroll repeat 0% 0%; BORDER-BOTTOM-WIDTH: 0px; TEXT-ALIGN: left; BORDER-RIGHT-WIDTH: 0px;margin-top: 1px;}
 
font{color:#ee9c01;}
.field{border:2px #e0e0e0 solid;width:266;height:45px; line-height:45px;}
</style>
<body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr><td align="center" valign="top">
<form id="form" method="post" action="../index.php?act=login&op=doLogin" target="iframeSubmit">
<table style="width:320px;text-align:center;" cellpadding="0" cellspacing="0">
<tr><td height="30" align="right" valign="bottom" style="padding-right:25px;"><img src="images/help.png" width="52"/></td></tr>
<tr><td height="27"></td></tr>
<tr><td height="70"><img src="images/top.png" width="179"/></td></tr>
<tr><td height="30" style="color:#8a8d8b; font-size:25px;">内容厨房</td></tr>
<tr><td height="20"></td></tr>
<tr><td align="center">
<table class="tblForm" cellpadding="0" cellspacing="0">
<tr><td height="45" width="70"><div class="field">&nbsp;&nbsp;用户名：<input type="text" name="username" id="name"/></div></td></tr>
<tr><td ></td></tr>
<tr><td height="45" ><div class="field">&nbsp;&nbsp;密码：&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="password" id="pass"/></div></td></td></tr>
</table></td></tr>
<tr><td height="27"></td></tr>
<tr><td height="45" align="center"><div style="background-color:#597ddb; color:#ffffff; height:45px;width:270px; line-height:45px;" onClick="login();">登录</div></td></tr>
<tr><td height="5"></td></tr>
<tr><td height="100"><img src="images/dd.jpg" width="320"/></td></tr>
<tr><td>&nbsp;</td></tr>
<input type="hidden" name="src" value="m"/>
</table>
</form>
</td></tr>
</table>
<iframe name="iframeSubmit" style="width:0px; height:0px;display:none;"></iframe>
<script>
function getQueryString(name) {
   var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
   var r = window.location.search.substr(1).match(reg);
   if (r!=null) return (r[2]); return null;
}
$(function(){
 
	});
function result(s)
{
	if(s==1)
	{
         var url = window.location.href;
		 if(url.indexOf("index.html")!=-1)
		 {
		 	url = url.substring(0,url.indexOf("index.html"));
		 }
		 url = url+"main.php";
		 //alert(url);
		 window.location.href=url;
	}
	else if(s==2)
	{
		$.dialog({
                    content : "用户名或密码错误",
                    title: "alert",
					width: 320,
					ok : function(){
            		return true;
        			}
                });
	}
}
function login()
{
	var errMsg = "";
	 
	if($("#name").val()=="")
	{
		errMsg = "用户名不能为空";
	}
 
	if($("#pass").val()=="")
	{
		errMsg = "密码不能为空";
	}
	//var idnum = $("#idnum").val();
	//if(idnum.length<6)
	//{
	//	errMsg = "编号必须为6位";
	//}
	if(errMsg!="")
	{
				$.dialog({
                    content : errMsg,
                    title: "alert",
					width: 320,
					ok : function(){
            		return true;
        			}
                });
		return;
	}
	document.getElementById("form").submit();
}
 
</script>
</body>
</html>